﻿using UnityEngine;
using System.Collections;

public class MoviePlayer : RecieaveInputObject {

    public void PlayMovie(string movieName)
    {
#if UNITY_ANDROID || UNITY_IPHONE
        Handheld.PlayFullScreenMovie("movieName", Color.black, FullScreenMovieControlMode.CancelOnInput);
#else
        //MovieTexture movie = renderer.material.mainTexture as MovieTexture;
        //audio.clip = movie.audioClip;
        //audio.Play();
        //movie.Play();


#endif

    }

    //public override void AwakeObject()
    //{
    //    m_Cam = Camera.mainCamera;    
    //}

    //public override void ButtonTouch(Collider collider)
    //{
    //    if (collider.name.Equals("Movie"))
    //    {
    //        Debug.Log("asdasdasda");

    //        MovieTexture movie = renderer.material.mainTexture as MovieTexture;
    //        //audio.clip = movie.audioClip;
    //        //audio.Play();
    //        movie.Play();

    //        SoundController.PlaySound(gameObject, movie.audioClip);

    //    }
    //}

    //void Start()
    //{
    //    MovieTexture movie = renderer.material.mainTexture as MovieTexture;
    //    audio.clip = movie.audioClip;
    //    audio.Play();
    //    movie.Play();
    //}
}
